<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>意见反馈管理</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <jsp:include page="../com/header.jsp"></jsp:include>
    <script type="text/javascript" src="../../js/comm/listcomm.js"></script>
    <script type="text/javascript">
        var contentUrl = root + "cms/feedBack/findFeedBackNEStatusPage";
        var editUrl = 'feedBackEdit.jsp?id=';
        var operateUrl = root + 'cms/feedBack/operateFeedBackByIds';
        function getfilter() {
            var _jsonFilter = "{";
            if ($("#search_user_name").val() && $("#search_user_name").val().length > 0) {
                _jsonFilter += "'search_EQ_user_name':'" + replaceSingleQuote($("#search_user_name").val()) + "',";
            }
            if ($("#search_content").val() && $("#search_content").val().length > 0) {
                _jsonFilter += "'search_LIKE_content':'" + replaceSingleQuote($("#search_content").val()) + "',";
            }
            if(($("#endTime").val() && $("#endTime").val().length > 0) && $("#startTime").val().length<=0){
                _jsonFilter += "'search_LTE_createTime':'"+$("#endTime").val()+"',";
            }
            if(($("#endTime").val() && $("#endTime").val().length > 0) && ($("#startTime").val() && $("#startTime").val().length > 0)){
                _jsonFilter += "'search_BETWEEN_createTime':'"+$("#startTime").val()+","+$("#endTime").val()+"',";
            }
            if (_jsonFilter != "{") {
                _jsonFilter = _jsonFilter.substring(0, _jsonFilter.length - 1);
            }
            _jsonFilter += "}";
            return _jsonFilter;
        }
    </script>
</head>
<body>
<section>
    <div>
        <div class="col-xs-12">
            <div class="box">
                <form id="search_form" class="form-horizontal">
                    <div class="tabSelect" id="selectHeadId">
                        <br>
                        <div class="form-group  col-md-3 search-form">
                            <label class="col-md-4 control-label controls" >用户名：</label>
                            <div class="col-md-8">
                                <input type="text" placeholder="用户名" class="form-control input-sm" id="search_user_name"
                                       name="user_name"/>
                            </div>
                        </div>
                        <div class="form-group  col-md-3 search-form">
                            <label class="col-md-4 control-label controls">反馈内容：</label>
                            <div class="col-md-8">
                                <input type="text" placeholder="反馈内容" class="form-control input-sm" id="search_content"
                                       name="content"/>
                            </div>
                        </div>
                        <div class="form-group  col-md-3 search-form">
                            <label class="col-md-4 control-label controls">反馈时间：</label>
                            <div class="col-md-8" style="padding-right:0;position:relative;">
                                <div class="datetime_clear"></div>
                                <input type="text" readOnly placeholder="开始时间" class="form-control input-sm" id="startTime" name="createTime"/>
                            </div>
                        </div>
                        <div class="form-group  col-md-3 search-form">
                            <label class="col-md-1 control-label controls">至</label>
                            <div class="col-md-8" style="padding-right:0;position:relative;">
                                <div class="datetime_clear"></div>
                                <input type="text" readOnly placeholder="结束时间" class="form-control input-sm" id="endTime" name="createTime"/>
                            </div>
                        </div>
                        <input type="button" value="查询" id="search" class="btn btn-primary searchBtn">
                    </div>
                </form>
                <div class="box-body table-responsive" style="clear:both;">
                    <input type="button" value="详细" id="feedBankDetail" class="btn btn-color">
                    <input type="button" value="删除" id="deleteSome" class="btn btn-danger">
                </div>
                <div class="box-body table-responsive">
                    <table id="example2" class="table table-bordered table-hover">
                        <thead>
                        <tr>
                            <th width="30"><input type="checkbox" id="_selectAll"/></th>
                            <th width="80">用户名</th>
                            <th width="80">反馈内容</th>
                            <th width="80">反馈时间</th>
                        </tr>
                        </thead>
                        <!-- 表格内容 start -->
                        <tbody id="mycontent"></tbody>
                        <!-- 表格内容 end -->
                    </table>
                    <!-- 分页标签 start -->
                    <div class="row page_big_div" id="displayPage"></div>
                    <!-- 分页标签 end -->
                    <script id="tableContentTmple" type="text/x-jsrender">
								<tr>
									<td><input id="ck_{{:id}}" ckId="{{:id}}" ckStatus="{{:status}}" class="ckSelect" type="checkbox" /></td>
									<td>{{:userName}}</td>
									<td title={{:content}}>{{subStrings:content lens=45}}</td>
									<td>{{:createTime}}</td>
  								</tr>

                    </script>
                </div>
            </div>
        </div>
</section>

<!-- 详细信息dialog start -->
<div class="modal fade" id="myModals" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <form id="validateForm" class="form-horizontal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" id="closeFeedBack" class="close" data-dismiss="modal"
                            aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="myModalLabel">反馈信息</h4>
                </div>
                <div class="modal-body">
                    <table id="feedBackListDetailTable">
                    </table>
                    <script id="feedBackListDetailTmpl" type="text/x-jsrender">
                        <tbody>
                            <tr>
                                <td class="search_td"><label>反馈内容:</label></td>
                                <td id="contents">{{:content}}</td>
                            </tr>
                            <tr>
                                <td class="search_td"><label>反馈时间:</label></td>
                                <td>
                                    <div id="time">{{:createTime}}</div>
                                </td>
                            </tr>
                            <tr>
                                <td class="search_td"><label>反馈图片:</label></td>
                                <td>
                                     {{if url}}
                                       {{for url.split(",")}}
                                         <img src="../../{{:}}" class="img" height="100" width="100">
                                       {{/for}}
                                     {{/if}}
                                </td>
                            </tr>
                        </tbody>
                        </script>
                </div>
            </div>
        </div>
    </form>
</div>
<!-- 详细信息dialog end -->



</body>
</html>